﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace House_Control
{
    //This class will deal with everything regarding Rooms in the House.
    class Room
    {
        //This variable identifies the room. We should probably have a string variable.
        int roomNo;

        //These variables store everything in the room.
        List<Appliance> appliances;
        List<Window> windows;
        List<Bathtub> bathtubs;
        List<Pool> pools;

        public Room(int roomNumber)
        {
            roomNo = roomNumber;
            appliances = new List<Appliance>();
            windows = new List<Window>();
            bathtubs = new List<Bathtub>();
            pools = new List<Pool>();
        }

        //This method takes as an argument the type of appliance we want to create then creates that appliance at adds it to the appliances List.
        public void addAppliance(int applianceType)
        {
            if (applianceType == Appliance.TELEVISION)
            {
                appliances.Add(new Television());
            }
            if (applianceType == Appliance.DISHWASHER)
            {
                appliances.Add(new Dishwasher());
            }
            if (applianceType == Appliance.LIGHT)
            {
                appliances.Add(new Light());
            }
            if (applianceType == Appliance.PETSTATION)
            {
                appliances.Add(new PetStation());
            }
            if (applianceType == Appliance.OVEN)
            {
                appliances.Add(new Oven());
            }
            
        }
        public Appliance getAppliance(int applianceNo)
        {
            return appliances[applianceNo];
        }
        //Add Pool
        public void addPool()
        {
            pools.Add(new Pool());
        }
        public Pool getPool(int poolNo){
            return pools[poolNo];
        }
        //Add Bathtub
        public void addTub()
        {
            bathtubs.Add(new Bathtub());
        }
        public Bathtub getTub(int tubNo)
        {
            return bathtubs[tubNo];
        }
        //Add Window
        public void addWindow()
        {
            windows.Add(new Window());
        }
        public Window getWindow(int windowNum)
        {
            return windows[windowNum];
        }
    }
}
